
//- This source code is licensed under the terms of the
//- GNU Affero General Public License found in the LICENSE file in
//- the root directory of this source tree.
//-
//- Copyright (c) 2021-present Kaleidos INC

a(
    href=""
    title="{{ 'EVENTS.TITLE' | translate }}"
    tg-nav="notifications"
    ng-mouseover="visible=true"
    ng-class="{'active': active, 'pending-notifications': total}"
)
    tg-svg(svg-icon="icon-bell")
    div.counter(ng-if="total", ng-class="{'counter-active': newEvent, 'large': total > 99, 'small': total < 10}") {{ total }}
div.navbar-dropdown-notifications(
    ng-show="visible",
    ng-mouseleave="visible=false"
)
    .header
        a.action(href="", ng-class="{'disabled': !total}", ng-click="!total||setAllAsRead()") {{ 'EVENTS.DISMISS_ALL' | translate }}

    .notifications-wrapper
        .empty(ng-if="!total && !loading")
            span {{ 'EVENTS.NO_NEW_EVENTS' | translate }}

        tg-notifications-list#my-notifications.dropdown-notifications-list(
            only-unread="true",
            infinite-scroll-container="#my-notifications"
            infinite-scroll-disabled="true"
        )

    .notifications-bottom
        a.action(tg-nav="notifications") {{ 'EVENTS.VIEW_ALL' | translate }}
